package com.alan.chat;

import java.io.*;
import java.net.Socket;
import java.util.Scanner;

/**
 * 升级版客户端
 * Created by Alan on 2017/8/5.
 */
public class Client {

    public static void main(String[] args) {
        //1.创建一个客户端对象
        Socket socket = null;
        Scanner input = new Scanner(System.in);
        try {
            socket = new Socket("127.0.0.1",8888);
            Send send = new Send(socket,"alan");
            Receive receive = new Receive(socket);
            send.start();
            receive.start();

        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
